<!DOCTYPE html>
<canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;"></canvas> 
<script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
<script type="text/javascript" src="/js/fireworks.js"></script>

<html lang="en">
<head><meta name="generator" content="Hexo 3.8.0">
    <meta charset="utf-8">
<title>C++基础知识 - Notouch</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">



    <meta name="description" content="👺 变量类型C++ 中每个变量都有指定的类型，类型决定了变量存储的大小和布局，该范围内的值都可以存储在内存中，运算符可应用于变量上。 变量的名称可以由字母、数字和下划线字符组成。它必须以字母或下划线开头。大写字母和小写字母是不同的，因为 C++ 是大小写敏感的。 以下几种基本的变量类型:    类型 描述    bool 存储值 true 或 false   char 通常是一个字符（八位），是">
<meta name="keywords" content="变量类型,常量,字符串,指针,C++,String">
<meta property="og:type" content="article">
<meta property="og:title" content="C++基础知识">
<meta property="og:url" content="http://notouch.top/2019/10/17/C-基础知识/index.html">
<meta property="og:site_name" content="Notouch">
<meta property="og:description" content="👺 变量类型C++ 中每个变量都有指定的类型，类型决定了变量存储的大小和布局，该范围内的值都可以存储在内存中，运算符可应用于变量上。 变量的名称可以由字母、数字和下划线字符组成。它必须以字母或下划线开头。大写字母和小写字母是不同的，因为 C++ 是大小写敏感的。 以下几种基本的变量类型:    类型 描述    bool 存储值 true 或 false   char 通常是一个字符（八位），是">
<meta property="og:locale" content="en">
<meta property="og:image" content="https://images.pexels.com/photos/3063362/pexels-photo-3063362.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500">
<meta property="og:updated_time" content="2019-12-08T10:47:31.184Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="C++基础知识">
<meta name="twitter:description" content="👺 变量类型C++ 中每个变量都有指定的类型，类型决定了变量存储的大小和布局，该范围内的值都可以存储在内存中，运算符可应用于变量上。 变量的名称可以由字母、数字和下划线字符组成。它必须以字母或下划线开头。大写字母和小写字母是不同的，因为 C++ 是大小写敏感的。 以下几种基本的变量类型:    类型 描述    bool 存储值 true 或 false   char 通常是一个字符（八位），是">
<meta name="twitter:image" content="https://images.pexels.com/photos/3063362/pexels-photo-3063362.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500">







<link rel="icon" href="/images/bitbug_favicon.ico">


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.7.2/css/bulma.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,600|Source+Code+Pro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/styles/monokai-sublime.css">


    
    
    
    <style>body>.footer,body>.navbar,body>.section{opacity:0}</style>
    

    
    
    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/css/lightgallery.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.css">
    

    
    

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.css">


    
    
    
    

<link rel="stylesheet" href="/css/back-to-top.css">


    
    

    
    
    
    

    
    
<link rel="stylesheet" href="/css/progressbar.css">
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>

    
    
    

    
    
    
        <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    

    


<link rel="stylesheet" href="/css/style.css">
</head>

<script src="https://cdn.zrahh.com/js/instantclick-1.2.2.js" type="module"></script>

<body class="is-3-column">
	<!-- 样式二（飘动的彩带） -->
	<script src="https://g.joyinshare.com/hc/piao.js" type="text/javascript"></script>
    <nav class="navbar navbar-main">
    <div class="container">
        <div class="navbar-brand is-flex-center">
            <a class="navbar-item navbar-logo" href="/">
            
                <img src="/images/dk_logo.svg" alt="C++基础知识" height="28">
            
            </a>
        </div>
        <div class="navbar-menu">
            
            <div class="navbar-start">
                
                <a class="navbar-item" href="/">Home</a>
                
                <a class="navbar-item" href="/archives">Archives</a>
                
                <a class="navbar-item" href="/categories">Categories</a>
                
                <a class="navbar-item" href="/tags">Tags</a>
                
                <a class="navbar-item" href="/about">About</a>
                
            </div>
            
            <div class="navbar-end">
                
                    
                    
                    <a class="navbar-item" target="_blank" title="Download on GitHub" href="https://github.com/duankong">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                    
                
                
                <a class="navbar-item is-hidden-tablet catalogue" title="Catalogue" href="javascript:;">
                    <i class="fas fa-list-ul"></i>
                </a>
                
                
                <a class="navbar-item search" title="Search" href="javascript:;">
                    <i class="fas fa-search"></i>
                </a>
                
            </div>
        </div>
    </div>
</nav>
    
    
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column is-6-tablet is-6-desktop is-9-widescreen has-order-2 column-main"><div class="card">
	

    
    <div class="card-image">
        <span class="image is-7by1">
            <img class="thumbnail" src="https://images.pexels.com/photos/3063362/pexels-photo-3063362.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="C++基础知识">
        </span>
    </div>
    
    
    <div class="card-content article ">
		
        
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
            
			
                <time class="level-item has-text-grey" datetime="2019-10-16T16:40:54.000Z">2019-10-17</time>
                
                
                <div class="level-item">
                <a class="has-link-grey -link" href="/categories/C/">C++</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/categories/C/Basic-knowledge/">Basic knowledge</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    9 minutes read (About 1313 words)
                </span>
                
                
                <span class="level-item has-text-grey" id="busuanzi_container_page_pv">
                    <i class="far fa-eye"></i>
                    <span id="busuanzi_value_page_pv">0</span> visits
                </span>
                
            </div>
        </div>
        
        
		
		
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
			
            
                C++基础知识
            

        </h1>
        
        <div class="content">
            <h3 id="👺-变量类型"><a href="#👺-变量类型" class="headerlink" title="👺 变量类型"></a>👺 变量类型</h3><p>C++ 中每个变量都有指定的类型，类型决定了变量存储的大小和布局，该范围内的值都可以存储在内存中，运算符可应用于变量上。</p>
<p>变量的名称可以由字母、数字和下划线字符组成。它必须以字母或下划线开头。大写字母和小写字母是不同的，因为 C++ 是大小写敏感的。</p>
<p>以下几种基本的变量类型:</p>
<table>
<thead>
<tr>
<th align="center">类型</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">bool</td>
<td align="center">存储值 true 或 false</td>
</tr>
<tr>
<td align="center">char</td>
<td align="center">通常是一个字符（八位），是一个整数类型</td>
</tr>
<tr>
<td align="center">int</td>
<td align="center">整数类型</td>
</tr>
<tr>
<td align="center">float</td>
<td align="center">单精度浮点值。单精度是这样的格式，1位符号，8位指数，23位小数</td>
</tr>
<tr>
<td align="center">double</td>
<td align="center">双精度浮点值。双精度是1位符号，11位指数，52位小数</td>
</tr>
<tr>
<td align="center">void</td>
<td align="center">表示类型的缺失</td>
</tr>
<tr>
<td align="center">wchar_t</td>
<td align="center">宽字符类型，双字节类型，在windows下是Unicode 16编码</td>
</tr>
</tbody></table>
<a id="more"></a> 

<h3 id="😿-常量"><a href="#😿-常量" class="headerlink" title="😿 常量"></a>😿 常量</h3><p>常量是固定值，定义后不能进行修改，程序执行期间不会改变。常量可以是任何的基本数据类型，可分为整型数字、浮点数字、字符、字符串和布尔值。</p>
<p>在 C++ 中，有两种简单的定义常量的方式：</p>
<ul>
<li><p>使用 #define 预处理器。  </p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> LENGTH 10</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>使用 const 关键字。</p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span>  LENGTH = <span class="hljs-number">10</span>;</span><br></pre></td></tr></table></figure>

</li>
</ul>
<h3 id="💖-字符串"><a href="#💖-字符串" class="headerlink" title="💖 字符串"></a>💖 字符串</h3><h5 id="✊-C-风格字符串"><a href="#✊-C-风格字符串" class="headerlink" title="✊ C 风格字符串"></a>✊ C 风格字符串</h5><p>字符串实际上是使用 null 字符 ‘\0’ 终止的一维字符数组。因此，一个以 null 结尾的字符串，包含了组成字符串的字符。</p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-keyword">char</span> greeting[<span class="hljs-number">6</span>] = &#123;<span class="hljs-string">'H'</span>, <span class="hljs-string">'e'</span>, <span class="hljs-string">'l'</span>, <span class="hljs-string">'l'</span>, <span class="hljs-string">'o'</span>, <span class="hljs-string">'\0'</span>&#125;;</span><br><span class="line"><span class="hljs-keyword">char</span> greeting[] = <span class="hljs-string">"Hello"</span>;</span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th align="center">函数</th>
<th align="center">目的</th>
</tr>
</thead>
<tbody><tr>
<td align="center">strcpy(s1, s2)</td>
<td align="center">复制字符串 s2 到字符串 s1。</td>
</tr>
<tr>
<td align="center">strcat(s1, s2)</td>
<td align="center">连接字符串 s2 到字符串 s1 的末尾。</td>
</tr>
<tr>
<td align="center">strlen(s1)</td>
<td align="center">返回字符串 s1 的长度。</td>
</tr>
<tr>
<td align="center">strcmp(s1, s2)</td>
<td align="center">如果 s1 和 s2 是相同的，则返回 0；如果 s1&lt;s2 则返回值小于 0；如果 s1&gt;s2 则返回值大于 0。</td>
</tr>
<tr>
<td align="center">strchr(s1, ch)</td>
<td align="center">返回一个指针，指向字符串 s1 中字符 ch 的第一次出现的位置。</td>
</tr>
<tr>
<td align="center">strstr(s1, s2)</td>
<td align="center">返回一个指针，指向字符串 s1 中字符串 s2 的第一次出现的位置。</td>
</tr>
<tr>
<td align="center">##### 👨‍🎨 C++ 中的 String 类</td>
<td align="center"></td>
</tr>
<tr>
<td align="center"><figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span></span><br><span class="line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;string&gt;</span></span></span><br><span class="line"><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> <span class="hljs-built_in">std</span>;</span><br><span class="line"><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span> <span class="hljs-params">()</span></span></span><br><span class="line"><span class="hljs-function"></span>&#123;</span><br><span class="line">   <span class="hljs-built_in">string</span> str1 = <span class="hljs-string">"Hello"</span>;</span><br><span class="line">   <span class="hljs-built_in">string</span> str2 = <span class="hljs-string">"World"</span>;</span><br><span class="line">   <span class="hljs-built_in">string</span> str3;</span><br><span class="line">   <span class="hljs-keyword">int</span>  len ;</span><br><span class="line">   <span class="hljs-comment">// 复制 str1 到 str3</span></span><br><span class="line">   str3 = str1;</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"str3 : "</span> &lt;&lt; str3 &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line">   <span class="hljs-comment">// 连接 str1 和 str2</span></span><br><span class="line">   str3 = str1 + str2;</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"str1 + str2 : "</span> &lt;&lt; str3 &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line">   <span class="hljs-comment">// 连接后，str3 的总长度</span></span><br><span class="line">   len = str3.size();</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"str3.size() :  "</span> &lt;&lt; len &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line">   <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></td>
<td align="center"></td>
</tr>
</tbody></table>
<h3 id="🌳-指针"><a href="#🌳-指针" class="headerlink" title="🌳 指针"></a>🌳 指针</h3><p>指针是一个变量，其值为另一个变量的地址，即，内存位置的直接地址。</p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-keyword">int</span>    *ip;    <span class="hljs-comment">/* 一个整型的指针 */</span></span><br><span class="line"><span class="hljs-keyword">double</span> *dp;    <span class="hljs-comment">/* 一个 double 型的指针 */</span></span><br><span class="line"><span class="hljs-keyword">float</span>  *fp;    <span class="hljs-comment">/* 一个浮点型的指针 */</span></span><br><span class="line"><span class="hljs-keyword">char</span>   *ch;    <span class="hljs-comment">/* 一个字符型的指针 */</span></span><br></pre></td></tr></table></figure>

<p>使用指针时会频繁进行以下几个操作：</p>
<ul>
<li>定义一个指针变量</li>
<li>把变量地址赋值给指针</li>
<li>访问指针变量中可用地址的值</li>
</ul>
<p>这些是通过使用一元运算符 * 来返回位于操作数所指定地址的变量的值。</p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span></span><br><span class="line"> </span><br><span class="line"><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> <span class="hljs-built_in">std</span>;</span><br><span class="line"> </span><br><span class="line"><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span> <span class="hljs-params">()</span></span></span><br><span class="line"><span class="hljs-function"></span>&#123;</span><br><span class="line">   <span class="hljs-keyword">int</span>  var = <span class="hljs-number">20</span>;   <span class="hljs-comment">// 实际变量的声明</span></span><br><span class="line">   <span class="hljs-keyword">int</span>  *ip;        <span class="hljs-comment">// 指针变量的声明</span></span><br><span class="line"> </span><br><span class="line">   ip = &amp;var;       <span class="hljs-comment">// 在指针变量中存储 var 的地址</span></span><br><span class="line"> </span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"Value of var variable: "</span>;</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; var &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line"> </span><br><span class="line">   <span class="hljs-comment">// 输出在指针变量中存储的地址</span></span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"Address stored in ip variable: "</span>;</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; ip &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line"> </span><br><span class="line">   <span class="hljs-comment">// 访问指针中地址的值</span></span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; <span class="hljs-string">"Value of *ip variable: "</span>;</span><br><span class="line">   <span class="hljs-built_in">cout</span> &lt;&lt; *ip &lt;&lt; <span class="hljs-built_in">endl</span>;</span><br><span class="line"> </span><br><span class="line">   <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="🚵-仿函数"><a href="#🚵-仿函数" class="headerlink" title="🚵 仿函数"></a>🚵 仿函数</h2><p><strong>仿函数（functors）</strong>在C++标准中采用的名称是函数对象（function objects）。仿函数主要用于STL中的算法中，虽然函数指针虽然也可以作为算法的参数，但是函数指针不能满足STL对抽象性的要求，也不能满足软件积木的要求–函数指针无法和STL其他组件搭配，产生更灵活变化。</p>
<p><strong>仿函数本质就是类重载了一个operator()，创建一个行为类似函数的对象</strong>。</p>
<figure class="highlight c++ hljs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Func</span></span></span><br><span class="line"><span class="hljs-class">&#123;</span></span><br><span class="line">     <span class="hljs-keyword">public</span>:</span><br><span class="line">         <span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">operator</span><span class="hljs-params">()</span> <span class="hljs-params">(<span class="hljs-keyword">const</span> <span class="hljs-built_in">string</span>&amp; str)</span> <span class="hljs-keyword">const</span> </span></span><br><span class="line"><span class="hljs-function">        </span>&#123;</span><br><span class="line">             <span class="hljs-built_in">cout</span>&lt;&lt;str&lt;&lt;<span class="hljs-built_in">endl</span>;</span><br><span class="line">         &#125;</span><br><span class="line"> &#125;;</span><br></pre></td></tr></table></figure>

<p>为什么要使用仿函数呢 ？</p>
<blockquote>
<p>1）仿函数比一般的函数灵活。        </p>
</blockquote>
<blockquote>
<p>2）仿函数有类型识别，可以作为模板参数。</p>
</blockquote>
<blockquote>
<p>3）执行速度上仿函数比函数和指针要更快的。</p>
</blockquote>
<h2 id="🐐-输入输出函数cin、cin-get-、cin-getline-、getline-、gets"><a href="#🐐-输入输出函数cin、cin-get-、cin-getline-、getline-、gets" class="headerlink" title="🐐 输入输出函数cin、cin.get()、cin.getline()、getline()、gets()"></a>🐐 输入输出函数cin、cin.get()、cin.getline()、getline()、gets()</h2><table>
<thead>
<tr>
<th align="center">函数</th>
<th align="center">头文件</th>
<th align="center">[空格]</th>
<th align="center">[TAB]</th>
<th align="center">[回车]</th>
<th align="center">读取内容</th>
</tr>
</thead>
<tbody><tr>
<td align="center">cin</td>
<td align="center">iostream</td>
<td align="center">X</td>
<td align="center">X</td>
<td align="center">X</td>
<td align="center">any 字符串数字，且对于结束符，并不保存到变量中</td>
</tr>
<tr>
<td align="center">cin.get()</td>
<td align="center">iostream</td>
<td align="center">√</td>
<td align="center">√</td>
<td align="center">X</td>
<td align="center">char   字符串</td>
</tr>
<tr>
<td align="center">cin.getline()</td>
<td align="center">iostream</td>
<td align="center">√</td>
<td align="center">√</td>
<td align="center">X</td>
<td align="center">char   字符串cin.getline(m,5,’a’)’a’为结束符，一般为’\0’</td>
</tr>
<tr>
<td align="center">getline()</td>
<td align="center">string</td>
<td align="center">√</td>
<td align="center">√</td>
<td align="center">X</td>
<td align="center">string   getline(cin,s);</td>
</tr>
<tr>
<td align="center">getchar()</td>
<td align="center">string</td>
<td align="center">√</td>
<td align="center">√</td>
<td align="center">√</td>
<td align="center">char 单个字符   ch=getchar();</td>
</tr>
</tbody></table>
<h2 id="🔰-函数stod、stof、stoi、stol、stoll、stoul"><a href="#🔰-函数stod、stof、stoi、stol、stoll、stoul" class="headerlink" title="🔰 函数stod、stof、stoi、stol、stoll、stoul"></a>🔰 函数stod、stof、stoi、stol、stoll、stoul</h2><table>
<thead>
<tr>
<th align="center">函数</th>
<th align="center">头文件</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">stod</td>
<td align="center">string</td>
<td align="center">Convert string to double</td>
</tr>
<tr>
<td align="center">stof</td>
<td align="center">string</td>
<td align="center">Convert string to float</td>
</tr>
<tr>
<td align="center">stoi</td>
<td align="center">string</td>
<td align="center">Convert string to integer</td>
</tr>
<tr>
<td align="center">stol</td>
<td align="center">string</td>
<td align="center">Convert string to long int</td>
</tr>
<tr>
<td align="center">stoll</td>
<td align="center">string</td>
<td align="center">Convert string to long long</td>
</tr>
<tr>
<td align="center">stoul</td>
<td align="center">string</td>
<td align="center">Convert string to unsigned integer</td>
</tr>
</tbody></table>
<hr>
<p>🍹 以上。(づ●─●)づ</p>
<p>转载请注明：<a href="http://notouch.top">Duankong的博客</a> » <a href="https://notouch.top/2019/10/17/C-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/#more">点击阅读原文</a></p>

        </div>
        
        <div class="level is-size-7 is-uppercase">
            <div class="level-start">
                <div class="level-item">
                    <span class="is-size-6 has-text-grey has-mr-7">#</span>
                    <a class="has-link-grey -link" href="/tags/C/">C++</a>, <a class="has-link-grey -link" href="/tags/String/">String</a>, <a class="has-link-grey -link" href="/tags/变量类型/">变量类型</a>, <a class="has-link-grey -link" href="/tags/字符串/">字符串</a>, <a class="has-link-grey -link" href="/tags/常量/">常量</a>, <a class="has-link-grey -link" href="/tags/指针/">指针</a>
                </div>
            </div>
        </div>
        
        
        
        
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css">
<script src="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js"></script>

        
    </div>
</div>



<div class="card">
    <div class="card-content">
        <h3 class="menu-label has-text-centered">Like this article? Support the author with</h3>
        <div class="buttons is-centered">
            
                
<a class="button is-info donate">
    <span class="icon is-small">
        <i class="fab fa-alipay"></i>
    </span>
    <span>Alipay</span>
    <div class="qrcode"><img src="/images/o_timg.gif" alt="Alipay"></div>
</a>

                
                
<a class="button is-success donate">
    <span class="icon is-small">
        <i class="fab fa-weixin"></i>
    </span>
    <span>Wechat</span>
    <div class="qrcode"><img src="/images/xiaomai.gif" alt="Wechat"></div>
</a>

                
                
<a class="button is-danger donate" href="https://github.com/duankong" target="_blank">
    <span class="icon is-small">
        <i class="fab fa-patreon"></i>
    </span>
    <span>Patreon</span>
</a>

                
        </div>
    </div>
</div>




<div class="card card-transparent">
    <div class="level post-navigation is-flex-wrap is-mobile">
        
        <div class="level-start">
            <a class="level level-item has-link-grey  article-nav-prev" href="/2019/10/30/C-容器和文件读写/">
                <i class="level-item fas fa-chevron-left"></i>
                <span class="level-item">C++容器和文件读写</span>
            </a>
        </div>
        
        
        <div class="level-end">
            <a class="level level-item has-link-grey  article-nav-next" href="/2019/10/15/Matlab读写超过4GB的图像/">
                <span class="level-item">Matlab读写超过4GB的图像</span>
                <i class="level-item fas fa-chevron-right"></i>
            </a>
        </div>
        
    </div>
</div>



<div class="card">
    <div class="card-content">
        <h3 class="title is-5 has-text-weight-normal">Comments</h3>
        
<div id="comment-container"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.4.1/dist/gitalk.css">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1.4.1/dist/gitalk.min.js"></script>
<script>
    var gitalk = new Gitalk({
        clientID: '6cd559678e1f221043a2',
        clientSecret: '80e2f67e1a4202407fa9624190ed476d7cb3a86d',
        id: '64b707d9513c86d7fc839cc986c30bef',
        repo: 'duankong.github.io',
        owner: 'duankong',
        admin: "duankong"
    })
    gitalk.render('comment-container')
</script>

    </div>
</div>
</div>
                

<!-- 粘贴的部分 -->
                          <!-- 修改，可选保留的栏 -->




<div class="column is-4-tablet is-4-desktop is-3-widescreen  has-order-3 column-left is-sticky">
    
        
<div class="card widget">
    <div class="card-content">
        <nav class="level">
            <div class="level-item has-text-centered">
                <div>
                    
                        <img class="image is-128x128 has-mb-6" src="/images/xiaomai.gif" alt="Duankong">
                    
                    
                    <p class="is-size-4 is-block">
                        Duankong
                    </p>
                    
                    
                    <p class="is-size-6 is-block">
                        🌅总之岁月漫长，然而值得等待！
                    </p>
                    
                    
                    <p class="is-size-6 is-flex is-flex-center has-text-grey">
                        <i class="fas fa-map-marker-alt has-mr-7"></i>
                        <span>Wuhan.Hubei</span>
                    </p>
                    
                </div>
            </div>
        </nav>
        <nav class="level is-mobile">
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        Posts
                    </p>
                    <p class="title has-text-weight-normal">
                        14
                    </p>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        Categories
                    </p>
                    <p class="title has-text-weight-normal">
                        9
                    </p>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        Tags
                    </p>
                    <p class="title has-text-weight-normal">
                        50
                    </p>
                </div>
            </div>
        </nav>
        <div class="level">
            <a class="level-item button is-link is-rounded" href="https://github.com/duankong" target="_blank">
                Follow</a>
        </div>
        
        
        <div class="level is-mobile">
            
            <a class="level-item button is-white is-marginless" target="_blank" title="Github" href="https://github.com/duankong">
                
                <i class="fab fa-github"></i>
                
            </a>
            
            <a class="level-item button is-white is-marginless" target="_blank" title="Facebook" href="https://facebook.com">
                
                <i class="fab fa-facebook"></i>
                
            </a>
            
            <a class="level-item button is-white is-marginless" target="_blank" title="Twitter" href="https://twitter.com">
                
                <i class="fab fa-twitter"></i>
                
            </a>
            
            <a class="level-item button is-white is-marginless" target="_blank" title="Dribbble" href="https://dribbble.com">
                
                <i class="fab fa-dribbble"></i>
                
            </a>
            
            <a class="level-item button is-white is-marginless" target="_blank" title="RSS" href="/">
                
                <i class="fas fa-rss"></i>
                
            </a>
            
        </div>
        
    </div>
</div>
    
        
<div class="card widget" id="toc">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                Catalogue
            </h3>
            <ul class="menu-list"><ul class="menu-list"><li>
        <a class="is-flex" href="#👺-变量类型">
        <span class="has-mr-6">1.1</span>
        <span>👺 变量类型</span>
        </a></li><li>
        <a class="is-flex" href="#😿-常量">
        <span class="has-mr-6">1.2</span>
        <span>😿 常量</span>
        </a></li><li>
        <a class="is-flex" href="#💖-字符串">
        <span class="has-mr-6">1.3</span>
        <span>💖 字符串</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#✊-C-风格字符串">
        <span class="has-mr-6">1.3.1</span>
        <span>✊ C 风格字符串</span>
        </a></li></ul></li><li>
        <a class="is-flex" href="#🌳-指针">
        <span class="has-mr-6">1.4</span>
        <span>🌳 指针</span>
        </a></li></ul><li>
        <a class="is-flex" href="#🚵-仿函数">
        <span class="has-mr-6">2</span>
        <span>🚵 仿函数</span>
        </a></li><li>
        <a class="is-flex" href="#🐐-输入输出函数cin、cin-get-、cin-getline-、getline-、gets">
        <span class="has-mr-6">3</span>
        <span>🐐 输入输出函数cin、cin.get()、cin.getline()、getline()、gets()</span>
        </a></li><li>
        <a class="is-flex" href="#🔰-函数stod、stof、stoi、stol、stoll、stoul">
        <span class="has-mr-6">4</span>
        <span>🔰 函数stod、stof、stoi、stol、stoll、stoul</span>
        </a></li></ul>
        </div>
    </div>
</div>

    
        
<div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                Categories
            </h3>
            <ul class="menu-list">
            <li>
        <a class="level is-marginless" href="/categories/C/">
            <span class="level-start">
                <span class="level-item">C++</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">9</span>
            </span>
        </a><ul><li>
        <a class="level is-marginless" href="/categories/C/Algorithm/">
            <span class="level-start">
                <span class="level-item">Algorithm</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">2</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/C/Basic-knowledge/">
            <span class="level-start">
                <span class="level-item">Basic knowledge</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">4</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/C/PAT-Note/">
            <span class="level-start">
                <span class="level-item">PAT Note</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a></li></ul></li><li>
        <a class="level is-marginless" href="/categories/Learning/">
            <span class="level-start">
                <span class="level-item">Learning</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a><ul><li>
        <a class="level is-marginless" href="/categories/Learning/Dimensionality-Reduction/">
            <span class="level-start">
                <span class="level-item">Dimensionality-Reduction</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/Learning/Feature-Extraction/">
            <span class="level-start">
                <span class="level-item">Feature-Extraction</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/Learning/Matlab/">
            <span class="level-start">
                <span class="level-item">Matlab</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li></ul></li><li>
        <a class="level is-marginless" href="/categories/Learning-Note/">
            <span class="level-start">
                <span class="level-item">Learning Note</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">2</span>
            </span>
        </a></li>
            </ul>
        </div>
    </div>
</div>
    
        

<div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            Links
        </h3>
        <ul class="menu-list">
        
            <li>
                <a class="level is-mobile" href="https://github.com/duankong" target="_blank">
                    <span class="level-left">
                        <span class="level-item">Github</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">github.com</span>
                    </span>
                </a>
            </li>
        
            <li>
                <a class="level is-mobile" href="https://google.com" target="_blank">
                    <span class="level-left">
                        <span class="level-item">Google</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">google.com</span>
                    </span>
                </a>
            </li>
        
            <li>
                <a class="level is-mobile" href="https://baidu.com" target="_blank">
                    <span class="level-left">
                        <span class="level-item">Baidu</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">baidu.com</span>
                    </span>
                </a>
            </li>
        
        </ul>
        </div>
    </div>
</div>


    
        
<div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            Tag Cloud
        </h3>
        <a href="/tags/01背包问题/" style="font-size: 10px;">01背包问题</a> <a href="/tags/BST/" style="font-size: 10px;">BST</a> <a href="/tags/Bigtiff/" style="font-size: 10px;">Bigtiff</a> <a href="/tags/C/" style="font-size: 20px;">C++</a> <a href="/tags/Dijkstra/" style="font-size: 10px;">Dijkstra</a> <a href="/tags/Function/" style="font-size: 10px;">Function</a> <a href="/tags/KKT/" style="font-size: 10px;">KKT</a> <a href="/tags/LCS/" style="font-size: 10px;">LCS</a> <a href="/tags/Matlab/" style="font-size: 10px;">Matlab</a> <a href="/tags/PAT/" style="font-size: 10px;">PAT</a> <a href="/tags/PCA降维/" style="font-size: 10px;">PCA降维</a> <a href="/tags/Queue/" style="font-size: 10px;">Queue</a> <a href="/tags/String/" style="font-size: 10px;">String</a> <a href="/tags/hashing/" style="font-size: 10px;">hashing</a> <a href="/tags/hashing查找/" style="font-size: 10px;">hashing查找</a> <a href="/tags/三维图像/" style="font-size: 10px;">三维图像</a> <a href="/tags/中序遍历/" style="font-size: 10px;">中序遍历</a> <a href="/tags/二叉平衡树/" style="font-size: 10px;">二叉平衡树</a> <a href="/tags/二叉搜索树/" style="font-size: 10px;">二叉搜索树</a> <a href="/tags/二阶偏导数/" style="font-size: 10px;">二阶偏导数</a> <a href="/tags/先序遍历/" style="font-size: 10px;">先序遍历</a> <a href="/tags/凸函数，正交和投影/" style="font-size: 10px;">凸函数，正交和投影</a> <a href="/tags/动态规划/" style="font-size: 15px;">动态规划</a> <a href="/tags/变量类型/" style="font-size: 10px;">变量类型</a> <a href="/tags/后序遍历/" style="font-size: 10px;">后序遍历</a> <a href="/tags/堆排序/" style="font-size: 15px;">堆排序</a> <a href="/tags/字符串/" style="font-size: 10px;">字符串</a> <a href="/tags/完全二叉树/" style="font-size: 10px;">完全二叉树</a> <a href="/tags/容器/" style="font-size: 10px;">容器</a> <a href="/tags/常量/" style="font-size: 10px;">常量</a> <a href="/tags/并查集/" style="font-size: 10px;">并查集</a> <a href="/tags/广度-层次-遍历/" style="font-size: 10px;">广度(层次)遍历</a> <a href="/tags/归并排序/" style="font-size: 10px;">归并排序</a> <a href="/tags/拉格朗日乘子/" style="font-size: 10px;">拉格朗日乘子</a> <a href="/tags/拓扑排序/" style="font-size: 15px;">拓扑排序</a> <a href="/tags/指针/" style="font-size: 10px;">指针</a> <a href="/tags/插入排序/" style="font-size: 10px;">插入排序</a> <a href="/tags/文件读写/" style="font-size: 10px;">文件读写</a> <a href="/tags/无偏估计/" style="font-size: 10px;">无偏估计</a> <a href="/tags/朴素贝叶斯算法/" style="font-size: 10px;">朴素贝叶斯算法</a> <a href="/tags/树状数组/" style="font-size: 15px;">树状数组</a> <a href="/tags/梯度散度和旋度/" style="font-size: 10px;">梯度散度和旋度</a> <a href="/tags/海森矩阵/" style="font-size: 10px;">海森矩阵</a> <a href="/tags/深度遍历/" style="font-size: 10px;">深度遍历</a> <a href="/tags/病毒标记/" style="font-size: 10px;">病毒标记</a> <a href="/tags/算法/" style="font-size: 15px;">算法</a> <a href="/tags/红黑树/" style="font-size: 15px;">红黑树</a> <a href="/tags/背包问题/" style="font-size: 10px;">背包问题</a> <a href="/tags/迪杰斯特拉算法，最短路径/" style="font-size: 10px;">迪杰斯特拉算法，最短路径</a> <a href="/tags/高斯函数/" style="font-size: 10px;">高斯函数</a>
    </div>
</div>

    
    
        <div class="column-right-shadow is-hidden-widescreen is-sticky">
        
            
<div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            Recent
        </h3>
        
        <article class="media">
            
            <a href="/2019/12/09/Function-for-Check/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="https://images.pexels.com/photos/2994325/pexels-photo-2994325.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="Function for Check">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-12-09T10:24:41.000Z">2019-12-09</time></div>
                    <a href="/2019/12/09/Function-for-Check/" class="has-link-black-ter is-size-6">Function for Check</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/C/">C++</a> / <a class="has-link-grey -link" href="/categories/C/Basic-knowledge/">Basic knowledge</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2019/12/08/PAT-小结/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="https://images.pexels.com/photos/3290601/pexels-photo-3290601.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="PAT 小结">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-12-08T10:09:29.000Z">2019-12-08</time></div>
                    <a href="/2019/12/08/PAT-小结/" class="has-link-black-ter is-size-6">PAT 小结</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/C/">C++</a> / <a class="has-link-grey -link" href="/categories/C/PAT-Note/">PAT Note</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2019/12/08/PAT-Note-2/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="https://images.pexels.com/photos/3210189/pexels-photo-3210189.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="PAT Note 2">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-12-08T09:46:17.000Z">2019-12-08</time></div>
                    <a href="/2019/12/08/PAT-Note-2/" class="has-link-black-ter is-size-6">PAT Note 2</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/C/">C++</a> / <a class="has-link-grey -link" href="/categories/C/PAT-Note/">PAT Note</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2019/12/03/PAT-note-1/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="https://images.pexels.com/photos/33109/fall-autumn-red-season.jpg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="PAT note 1">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-12-03T14:32:21.000Z">2019-12-03</time></div>
                    <a href="/2019/12/03/PAT-note-1/" class="has-link-black-ter is-size-6">PAT note 1</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/C/">C++</a> / <a class="has-link-grey -link" href="/categories/C/PAT-Note/">PAT Note</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2019/12/02/背包问题/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="https://images.pexels.com/photos/2931242/pexels-photo-2931242.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=1&amp;w=500" alt="背包问题">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-12-02T15:39:41.000Z">2019-12-02</time></div>
                    <a href="/2019/12/02/背包问题/" class="has-link-black-ter is-size-6">背包问题</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/C/">C++</a> / <a class="has-link-grey -link" href="/categories/C/Algorithm/">Algorithm</a>
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>

        
            <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            Archives
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/archives/2019/12/">
                <span class="level-start">
                    <span class="level-item">December 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">5</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/archives/2019/11/">
                <span class="level-start">
                    <span class="level-item">November 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/archives/2019/10/">
                <span class="level-start">
                    <span class="level-item">October 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">4</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/archives/2018/11/">
                <span class="level-start">
                    <span class="level-item">November 2018</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">3</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/archives/2018/10/">
                <span class="level-start">
                    <span class="level-item">October 2018</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>
        
            <div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                Tags
            </h3>
            <div class="field is-grouped is-grouped-multiline">
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/01背包问题/">
                        <span class="tag">01背包问题</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/BST/">
                        <span class="tag">BST</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/Bigtiff/">
                        <span class="tag">Bigtiff</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/C/">
                        <span class="tag">C++</span>
                        <span class="tag is-grey">9</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/Dijkstra/">
                        <span class="tag">Dijkstra</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/Function/">
                        <span class="tag">Function</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/KKT/">
                        <span class="tag">KKT</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/LCS/">
                        <span class="tag">LCS</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/Matlab/">
                        <span class="tag">Matlab</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/PAT/">
                        <span class="tag">PAT</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/PCA降维/">
                        <span class="tag">PCA降维</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/Queue/">
                        <span class="tag">Queue</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/String/">
                        <span class="tag">String</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/hashing/">
                        <span class="tag">hashing</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/hashing查找/">
                        <span class="tag">hashing查找</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/三维图像/">
                        <span class="tag">三维图像</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/中序遍历/">
                        <span class="tag">中序遍历</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/二叉平衡树/">
                        <span class="tag">二叉平衡树</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/二叉搜索树/">
                        <span class="tag">二叉搜索树</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/二阶偏导数/">
                        <span class="tag">二阶偏导数</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/先序遍历/">
                        <span class="tag">先序遍历</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/凸函数，正交和投影/">
                        <span class="tag">凸函数，正交和投影</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/动态规划/">
                        <span class="tag">动态规划</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/变量类型/">
                        <span class="tag">变量类型</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/后序遍历/">
                        <span class="tag">后序遍历</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/堆排序/">
                        <span class="tag">堆排序</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/字符串/">
                        <span class="tag">字符串</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/完全二叉树/">
                        <span class="tag">完全二叉树</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/容器/">
                        <span class="tag">容器</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/常量/">
                        <span class="tag">常量</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/并查集/">
                        <span class="tag">并查集</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/广度-层次-遍历/">
                        <span class="tag">广度(层次)遍历</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/归并排序/">
                        <span class="tag">归并排序</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/拉格朗日乘子/">
                        <span class="tag">拉格朗日乘子</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/拓扑排序/">
                        <span class="tag">拓扑排序</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/指针/">
                        <span class="tag">指针</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/插入排序/">
                        <span class="tag">插入排序</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/文件读写/">
                        <span class="tag">文件读写</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/无偏估计/">
                        <span class="tag">无偏估计</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/朴素贝叶斯算法/">
                        <span class="tag">朴素贝叶斯算法</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/树状数组/">
                        <span class="tag">树状数组</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/梯度散度和旋度/">
                        <span class="tag">梯度散度和旋度</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/海森矩阵/">
                        <span class="tag">海森矩阵</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/深度遍历/">
                        <span class="tag">深度遍历</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/病毒标记/">
                        <span class="tag">病毒标记</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/算法/">
                        <span class="tag">算法</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/红黑树/">
                        <span class="tag">红黑树</span>
                        <span class="tag is-grey">2</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/背包问题/">
                        <span class="tag">背包问题</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/迪杰斯特拉算法，最短路径/">
                        <span class="tag">迪杰斯特拉算法，最短路径</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/tags/高斯函数/">
                        <span class="tag">高斯函数</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
            </div>
        </div>
    </div>
</div>
        
        </div>
    
</div>

                

<!-- 粘贴的部分 -->

            </div>
        </div>
    </section>
    <footer class="footer">
    <div class="container">
        <div class="level">
            <div class="level-start has-text-centered-mobile">
				<script src="//code.tidio.co/3tnny2tdx9oh0xzuitaxzhuakj60ydfy.js"></script>
                <a class="footer-logo is-block has-mb-12" href="/">
                
                    <img src="/images/dk_logo.svg" alt="C++基础知识" width="304" height="50">
                
                </a>
                <p class="is-size-10">
                &copy; 2019 duankong&nbsp;
                Powered by <a href="https://hexo.io/" target="_blank">Hexo</a> & <a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank">Icarus</a>
                
                <br>
                <span id="busuanzi_container_site_uv">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <i class="fa fa-bolt" aria-hidden="true "></i>
                Visited by <span id="busuanzi_value_site_uv">0</span> users
                <i class="fa fa-bolt" aria-hidden="true "></i>
                </span>
                
                </p>
            </div>
            
            <span id="timeDate">载入天数...</span><span id="times">载入时分秒...</span>
            <script>
                var now = new Date(); 
                function createtime() { 
                    var grt= new Date("5/25/2019 11:50:00");//此处修改你的建站时间或者网站上线时间 
                    now.setTime(now.getTime()+250); 
                    days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days); 
                    hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours); 
                    if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum); 
                    mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;} 
                    seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum); 
                    snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;} 
                    document.getElementById("timeDate").innerHTML = "Security Run For "+dnum+" Day "; 
                    document.getElementById("times").innerHTML = hnum + " Hour " + mnum + " Min " + snum + " Second"; 
                } 
            setInterval("createtime()",250);
            </script>
            
            <div class="level-end">
            
                <div class="field has-addons is-flex-center-mobile has-mt-5-mobile is-flex-wrap is-flex-middle">
                
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Creative Commons" href="https://creativecommons.org/">
                        
                        <i class="fab fa-creative-commons"></i>
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Attribution 4.0 International" href="https://creativecommons.org/licenses/by/4.0/">
                        
                        <i class="fab fa-creative-commons-by"></i>
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Download on GitHub" href="https://github.com/duankong">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                </p>
                
                </div>
            
            </div>
        </div>
    </div>

	
</footer>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.22.2/min/moment-with-locales.min.js"></script>
<script>moment.locale("en");</script>


    
    
    
    <script src="/js/animation.js"></script>
    

    
    
    
    <script src="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/js/lightgallery.min.js" defer></script>
    <script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js" defer></script>
    <script src="/js/gallery.js" defer></script>
    

    
    

<div id="outdated">
    <h6>Your browser is out-of-date!</h6>
    <p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/">Update
            my browser now </a></p>
    <p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js" defer></script>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'flex'
        });
    });
</script>


    
    
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML" defer></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
    MathJax.Hub.Config({
        'HTML-CSS': {
            matchFontHeight: false
        },
        SVG: {
            matchFontHeight: false
        },
        CommonHTML: {
            matchFontHeight: false
        },
        tex2jax: {
            inlineMath: [
                ['$','$'],
                ['\\(','\\)']
            ]
        }
    });
});
</script>

    
    

<a id="back-to-top" title="Back to Top" href="javascript:;">
    <i class="fas fa-chevron-up"></i>
</a>
<script src="/js/back-to-top.js" defer></script>


    
    

    
    
    
    

    
    
    
    
    
    <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js" defer></script>
    <script src="/js/clipboard.js" defer></script>
    

    
    
    

    


<script src="/js/main.js" defer></script>

    
    <div class="searchbox ins-search">
    <div class="searchbox-container ins-search-container">
        <div class="searchbox-input-wrapper">
            <input type="text" class="searchbox-input ins-search-input" placeholder="Type something...">
            <span class="searchbox-close ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="searchbox-result-wrapper ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: 'Posts',
                PAGES: 'Pages',
                CATEGORIES: 'Categories',
                TAGS: 'Tags',
                UNTITLED: '(Untitled)',
            },
            CONTENT_URL: '/content.json',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script src="/js/insight.js" defer></script>
<link rel="stylesheet" href="/css/search.css">
<link rel="stylesheet" href="/css/insight.css">
    
    

	
	<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/koharu.model.json"},"display":{"position":"left","width":150,"height":300},"mobile":{"show":true},"log":false});</script></body>

</html>